{% extends "Common/AdminBase.html" %}
{% load filters %} 
{% block Location %}

<li class="current">用户管理</li>
<script>
//设置当前导航
Nav_Page="Account";
</script>

{% endblock %}


{% block content %}

 
 <input type="button" value="新建账号" alt="新建账号"  dataType="DialogAjax" dataval="/AdminMain/Account/Add/" class="btn">
 
 <div class="status info">
        	
        	<p><img src="/site_media/admin/img/icons/icon_info.png" alt="Information"><span>提示:</span>创建和管理的用户不能高于当前用户权限.一个用户可以拥有多个登录账号</p>
        </div>
 
 
<div class="contentcontainer">
	
            <div class="headings altheading">
                <h2>用户管理</h2>
            </div>
            <div class="contentbox">
             <form id="formAccount" action="#" AjaxForm="/AdminMain/Account/List/" AjaxSuccess="#divAccount">
            	<div class="extrabottom" style="padding-top:0px; background:url(null)">
            		
                    <div class="bulkactions" >
                		登录账号：<input type="text" name="LoginAccount" style="width:75px;padding:7px;" id="smallbox" class="inputbox smallbox">
						&nbsp;&nbsp;
						昵称：<input type="text" name="NickName" style="width:75px;padding:7px" id="smallbox" class="inputbox smallbox">
						
						&nbsp;&nbsp;状态：
                    	<select name="State">
                        	<option value="-1">全部</option>
							<option value="1">启用</option>
							<option value="0">停用</option>
                        </select>
						
						&nbsp;&nbsp;权限组：
						<select  name="PurviewTeamID" style="width:80px;" >
						<option value="-1">全部</option>
                        {% for info in Model   %}
                    	<option value="{{info.id}}">{{info.Title}}</option>
						{% endfor  %}
                        </select>
						
                        <input type="submit" value="查 询" class="btn">
                    </div>
                </div>
               <div id='divAccount'></div>
               
                <div style="clear: both;"></div>
				   </form>
				  <script>
				  	
					 function OnAllPost()
					 {
					 	selec=$("#selectBatch").val()
						
						if(selec=="-1")
						{
							$.alert("请选择一个操作")
							return false; 
						}
					 	var data = $("[AllPost]:checked").map(function() { return $(this).attr('AllPost'); }).get().join(',');
					    
						if(data=="")
						{
							$.alert("未勾选任何一列")
							return false; 
						}
						
			            $.AjaxServer('/AdminMain/Account/DoBatch/',{AccountList:data,selectBatch:selec},function(){
			                 //  $.tips('操作成功');
						previousSubmit('formAccount',1);
			         });
					 }
					
					 function OnCheckboxall(obj)
					 {
					 	b=$(obj).attr("checked");
						$("[name='checkall']").each(function()
						{
							$(this).attr("checked",b);
						});
					 }
					
					
					$(function(){
						//初始化加载
						AjaxFormExec($("#formAccount"))
					})
					
				  </script>
               </div>
          
        </div>
{% endblock %}



